package cn.ctodb.cms.service.dto;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;


/**
 * A DTO for the CmsChannel entity.
 */
public class CmsChannelDTO implements Serializable {

    private Long id;

    private String name;

    @NotNull
    private String code;

    private Integer sort;

    private String tplChannel;

    private String tplContent;


    private Long modelId;
    
    private Long parentId;
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public String getTplChannel() {
        return tplChannel;
    }

    public void setTplChannel(String tplChannel) {
        this.tplChannel = tplChannel;
    }
    public String getTplContent() {
        return tplContent;
    }

    public void setTplContent(String tplContent) {
        this.tplContent = tplContent;
    }

    public Long getModelId() {
        return modelId;
    }

    public void setModelId(Long cmsModelId) {
        this.modelId = cmsModelId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long cmsChannelId) {
        this.parentId = cmsChannelId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        CmsChannelDTO cmsChannelDTO = (CmsChannelDTO) o;

        if ( ! Objects.equals(id, cmsChannelDTO.id)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

    @Override
    public String toString() {
        return "CmsChannelDTO{" +
            "id=" + id +
            ", name='" + name + "'" +
            ", code='" + code + "'" +
            ", sort='" + sort + "'" +
            ", tplChannel='" + tplChannel + "'" +
            ", tplContent='" + tplContent + "'" +
            '}';
    }
}
